# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-ffi-checklib
pkgver=0.28
pkgrel=2
pkgdesc="Check that a library is available for FFI"
arch=('any')
license=('PerlArtistic')
url="https://metacpan.org/release/FFI-CheckLib"
depends=('perl')
checkdepends=('perl-test-exit' 'perl-test2-suite')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/FFI-CheckLib-$pkgver.tar.gz")
sha512sums=('9ac42e7153902cd178d9ee7d3db7edb96deb30c8b53cdd6c14706cde200598ecd98031c8e17394fcd1fb2c770a0ec776131e2ff93491d6b307a6e595fd788d5a')

build() {
  cd FFI-CheckLib-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd FFI-CheckLib-$pkgver
  make test
}

package() {
  cd FFI-CheckLib-$pkgver
  make DESTDIR="$pkgdir" install
}
